import { Table } from 'antd'
import React, { useEffect } from 'react'
import Bus from '@/utils/bus'
const dwsLog: React.FC = () => {
  const column = [
    { title: '数据日期', dataIndex: 'stat_dt', width: 100 },
    { title: '业务线', dataIndex: 'business_tag', width: 130 },
    {
      title: '大盘',
      children: [
        { title: '大盘放款', dataIndex: 'principal', width: 130 },
        { title: '大盘放款定价', dataIndex: 'principal_apr', width: 130 },
        { title: '大盘放款风险', dataIndex: 'loan_risk', width: 130 },
        { title: '大盘价差', dataIndex: 'price_diff', width: 130 },
        { title: '大盘管理余额', dataIndex: 'principal_payable', width: 130 }
      ]
    },
    {
      title: '自营',
      children: [
        { "title": "自营放款", "dataIndex": "zy_principal", "width": 130 },
        { "title": "自营放款定价", "dataIndex": "zy_principal_apr", "width": 130 },
        { "title": "自营放款风险", "dataIndex": "zy_loan_risk", "width": 130 },
        { "title": "自营价差", "dataIndex": "zy_price_diff", "width": 130 },
        { "title": "自营管理余额", "dataIndex": "zy_principal_payable", "width": 130 },
        { "title": "自营放款占比", "dataIndex": "principal_percent", "width": 130 },
        { "title": "自营管理余额占比", "dataIndex": "payable_percent", "width": 130 }
      ]
    },

  ]
  const fetchInfo = value => {
    console.log(value);
    
  }
 useEffect(() => {
  Bus.on('send', fetchInfo)
 }, [])
  return <Table
    // columns={column}
    // dataSource={[]}
    bordered
    scroll={{
      x: 'max-content'
    }} />
}

export default dwsLog